<%@ page language="java" import="java.util.*" pageEncoding="UTF-8" contentType="text/html; charset=utf-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<html>
<jsp:include page="../head.jsp"></jsp:include>
<body>
<jsp:include page="Left.jsp"></jsp:include>
<form id='fmTbUsers'  action="TbUsersServlet?method=${sessionScope.tbUsers==null?'add':'edit'}" method='post'>
 <input type='hidden' name='userId' id='userId' value='${sessionScope.tbUsers.userId }' /> 
<table>
<tr><td colspan='2'></td></tr>
<tr>
    <td>用户名称</td>
    <td><input type='text' name='userName' id='userName' value='${sessionScope.tbUsers.userName }' /></td>
</tr>
<tr>
    <td>用户别名</td>
    <td><input type='text' name='userNickName' id='userNickName' value='${sessionScope.tbUsers.userNickName }' /></td>
</tr>
<tr>
    <td>身份证号</td>
    <td><input type='text' name='userCardId' id='userCardId' value='${sessionScope.tbUsers.userCardId }' /></td>
</tr>
<tr>
    <td>用户工号</td>
    <td><input type='text' name='userWorkId' id='userWorkId' value='${sessionScope.tbUsers.userWorkId }' /></td>
</tr>
<tr>
    <td>用户密码</td>
    <td><input type='text' name='userPass' id='userPass' value='${sessionScope.tbUsers.userPass }' /></td>
</tr>
<tr>
    <td>手机号码</td>
    <td><input type='text' name='userPhone' id='userPhone' value='${sessionScope.tbUsers.userPhone }' /></td>
</tr>
<tr>
    <td>用户邮箱</td>
    <td><input type='text' name='userEmail' id='userEmail' value='${sessionScope.tbUsers.userEmail }' /></td>
</tr>
<tr>
    <td>用户地址</td>
    <td><input type='text' name='userAddress' id='userAddress' value='${sessionScope.tbUsers.userAddress }' /></td>
</tr>
<tr>
    <td>出生日期</td>
    <td><input type='text' name='userBirthday' id='userBirthday' class="Wdate" size="20" readonly onclick="WdatePicker({el:this,dateFmt:'yyyy-MM-dd'})" value='${sessionScope.tbUsers.userBirthday }' /></td>
</tr>
<tr>
    <td>入职时间</td>
    <td><input type='text' name='userInCompanyTime' id='userInCompanyTime' class="Wdate" size="20" readonly onclick="WdatePicker({el:this,dateFmt:'yyyy-MM-dd'})" value='${sessionScope.tbUsers.userInCompanyTime }' /></td>
</tr>
<tr>
    <td>用户类别</td>
    <td>
    <select name='userState' id='userState' >
    <option value='-1' ${sessionScope.tbUsers.userState==-1?'selected':'' }>无</option>
    <option value='0' ${sessionScope.tbUsers.userState==0?'selected':'' }>超级管理员</option>
    <option value='1' ${sessionScope.tbUsers.userState==1?'selected':'' }>管理员</option>
    <option value='2' ${sessionScope.tbUsers.userState==2?'selected':'' }>审核人员</option>
    <option value='3' ${sessionScope.tbUsers.userState==3?'selected':'' }>普通用户</option>
</select>
</tr>
<tr>
    <td>上级领导</td>
    <td>
      <div>
    <select name='parentUserId' id='parentUserId' >
    <option value='-1'>无</option>
	<c:forEach items="${sessionScope.tbUsersList}" var="tbUser" varStatus="status">
		<option value="${tbUser.userId }" ${sessionScope.tbUsers.tbUserParent.userId== tbUser.userId?'selected':''}>${tbUser.userName }</option>
	</c:forEach>
</select>
</div>
</tr>
<tr>
    <td>是否有效</td>
    <td>
    <input type="radio" name='isEnable' value='0' ${sessionScope.tbUsers.isEnable==0?' checked ':'' }  ${sessionScope.tbUsers==null?'checked':''} />有效
    <input type="radio" name='isEnable' value='1' ${sessionScope.tbUsers.isEnable==1?' checked ':'' }/>无效
    </td>
</tr>
<tr>
   <td>是否是管理员</td>
   <td>
      <input type="radio" name='isAdmin' value='0' ${sessionScope.tbUsers.isAdmin==0?' checked ':'' }  ${sessionScope.tbUsers==null?'checked':''} />不是
      <input type="radio" name='isAdmin' value='1' ${sessionScope.tbUsers.isAdmin==1?' checked ':'' }/>是
   </td>
</tr>
 
<tr>
    <td>备注</td>
    <td><input type='text' name='userMemo' id='userMemo' value='${sessionScope.tbUsers.userMemo }' /></td>
</tr>
<tr>
    <td align="center" colspan='2' ><input type="submit" name="btsubmit" id="btsubmit" value="${sessionScope.tbUsers==null?'添加':'修改'}" /><input type='reset' value='重置' /><input type='button' value='返回' onclick='history.go(-1);' /></td>
</tr></table>
</form><jsp:include page="../foot.jsp"></jsp:include>
</body></html>